Texture2D gDiffuseTex;

SamplerState samAnisotropic{
	Filter = ANISOTROPIC;
	MaxAnisotropy = 4;
};

struct PS_IN{
	float4 vp : SV_POSITION;

	float4 vc : POSITIONC;
	float4 nc : NORMALC;
	float2 uv : TEXCOORD;
};

float4 main(PS_IN input) : SV_Target {
	//implement a lambert model
	float4 iDir = float4(0,0,0,1) -input.vc;
	float factor = dot(normalize(iDir), normalize(input.nc));
	factor = clamp(factor, 0, 1);
	float4 color = gDiffuseTex.Sample(samAnisotropic, input.tl);
	return float4(float3(1, 1, 1)*factor, 1);
}